package su.jet.common.irc.protocol.request;

import java.io.IOException;
import java.util.Map;
import java.util.Set;

import su.jet.common.irc.domain.User;
import su.jet.common.irc.protocol.Session;
import su.jet.irc.server.service.DataService;

@SuppressWarnings("serial")
public class RegUserRequest implements Request {

	private User user;
	
	public RegUserRequest(User user) {
		this.user = user;
	}

	@Override
	public void process(Session session, Set<User> regUsers,
			Map<User, Session> onlineUsers, DataService dataService)
			throws IOException {
		
		dataService.addUserToDB(user);
		
	 }

	public User getUser() {
		return user;
	}
}
